﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="chat.aspx.vb" Inherits="DusanProject.chat" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

<asp:Table runat="server" CssClass="chatTable" ID="tbChat" CellPadding="10" CellSpacing="10">

<asp:TableRow>

<asp:TableCell>

 <asp:GridView ID="gvChat" runat="server" AllowPaging="True" 
        AutoGenerateColumns="False" DataSourceID="SqlDataSource1" Width="700">
        <Columns>
            <asp:BoundField DataField="UserName" HeaderText="From" 
                SortExpression="UserName" />
            <asp:BoundField DataField="ToUser" HeaderText="To" SortExpression="ToUser" />
            <asp:BoundField DataField="Message" HeaderText="Message" 
                SortExpression="Message" />
            <asp:BoundField DataField="DateTimePosted" HeaderText="Date Time Posted" 
                SortExpression="DateTimePosted" />
        </Columns>
    </asp:GridView>

    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:dbDusanCS %>" 
        ProviderName="<%$ ConnectionStrings:dbDusanCS.ProviderName %>" 
        SelectCommand="SELECT [UserName], [ToUser], [Message], [DateTimePosted] FROM [ChatQuery] ORDER BY [DateTimePosted] DESC">
    </asp:SqlDataSource>



</asp:TableCell>


</asp:TableRow>

<asp:TableRow>

<asp:TableCell>

    Send Message: <asp:TextBox ID="chatTextBox" runat="server" MaxLength="30"></asp:TextBox> &nbsp;  (Max 30 characters) &nbsp;
    To: <asp:DropDownList ID="dd_Users" runat="server"></asp:DropDownList>


    <asp:Button ID="btn_Chat" runat="server" CssClass="slideButton" Text="Send Message" />


</asp:TableCell>


</asp:TableRow>


</asp:Table>

   
</asp:Content>
